import { defineStore } from 'pinia'
import {ref} from 'vue'

  const useLoginStore = defineStore('login',() => {
    let data: any = localStorage.getItem('token')
    const userInfo = ref('')
    console.log(userInfo.value,'全局的用户信息')
    if(!userInfo.value){
        userInfo.value =  JSON.parse(data) ||{}
    }
    return {
        userInfo
    }
})

export default useLoginStore